package com.lh.common.pojo;

import java.util.List;

/**
 * 分页共用类
 *
 * @author liuhe
 * @date 2020/06/18
 */
public class PageResult<T> {
    /**
     * 总条数
     */
    private Long total;
    /**
     * 总页数
     */
    private Integer totalPage;

    /**
     * 当前页
     */
    private Integer curPage;

    /**
     * 当前页数据
     */
    private List<T> items;

    public Long getTotal() {
        return total;
    }

    public void setTotal(Long total) {
        this.total = total;
    }

    public Integer getTotalPage() {
        return totalPage;
    }

    public void setTotalPage(Integer totalPage) {
        this.totalPage = totalPage;
    }

    public Integer getCurPage() {
        return curPage;
    }

    public void setCurPage(Integer curPage) {
        this.curPage = curPage;
    }

    public List<T> getItems() {
        return items;
    }

    public void setItems(List<T> items) {
        this.items = items;
    }

    public PageResult(Long total, Integer totalPage, Integer curPage, List<T> items) {
        this.total = total;
        this.totalPage = totalPage;
        this.curPage = curPage;
        this.items = items;
    }
}
